extends ../../components/layout
append style
  link(rel='stylesheet', href='../../assets/css/agreement/agreement.css')
  link(rel='stylesheet', href='../../assets/css/cashierDesk/cashierDesk.css')
  link(rel='stylesheet', href='../../assets/css/simulate/simulatePage.css')
block title
  title 收银台
  //- headTips
  mixin headTips(tipContent)
    .gzl-cell.gzl-headTips
      span.gzl-cell__bd #{tipContent}
      span.close-collapse: +icon('#icon-close')

  //- 订单详情
  mixin payLi(list)
    -var list = [{"tit": "订单编号","desc": 201607250000573},{"tit": "订单金额","desc": 2000},{"tit": "已付金额","desc": 2000},{"tit": "微信支付","time" : "2018-12-31 10:25:31","desc": 2000},{"tit": "支付宝支付","time" : "2018-12-31 10:25:31","desc": 2000},{"tit": "建行支付","time" : "2018-12-31 10:25:31","desc": 2000},{"tit": "中行支付","time" : "2018-12-31 10:25:31","desc": 2000}]
    ul.payOrderList
      -for(var i=0;i<list.length;i++)
        li.gzl-flex.payMsgItem
          .paytext #{list[i].tit}
          .gzl-flex__item.payTime #{list[i].time}
          .pay ￥
            | #{list[i].desc}
        li.gzl-flex.payMsgItem
          .paytext #{list[i].tit}
          .gzl-flex__item.payTime #{list[i].time}
          .pay ￥
            | #{list[i].desc}

  //-  支付方式li
  //- 参数 +payItem("微信logo","微信支付",true,{"cardNum":"信用卡",cardTips:"周末及9号龙支付最高立减￥150"})
  mixin payWayItem(iconLink,payName,unionSupport,desc)
    if desc
      li.gzl-cell.payWayItem&attributes(attributes)
        .gzl-cell__hd
          +icon(iconLink)
          //- +icon('#icon-weixin')
          //- +icon('#icon-weixin')(class="gzl-pay__icon")
        .gzl-cell__bd
          .payWayText-up #{payName}
          .payWayText-down
            if desc.cardNum
              span.cardNum #{desc.cardNum}
            if desc.cardTips
              span.cardTips #{desc.cardTips}
        if unionSupport
          .payUnionSupport
            +icon('#icon-cashier-unionpay')
        .contact-check
            +icon('#icon-uncheck')

    else
      li.gzl-cell.payWayItem.single&attributes(attributes)
        .gzl-cell__hd
          +icon(iconLink)
          //- +icon('#icon-weixin')(class="gzl-pay__icon")
        .gzl-cell__bd
          .payWayText-up #{payName}
        if unionSupport
          .payUnionSupport
            +icon('#icon-cashier-unionpay')
        .contact-check
            +icon('#icon-uncheck')

  //- 待支付状态;
  mixin readyPayBlock
      .readyPayBlock
        .payStatus
          .payMoney 待支付
            |
            span ￥
              em 26000
          .payTimeLimit 距离订单取消还剩
            .seckill-wrap
              span.hour 99
              | :
              span.min 00
              | :
              span.sec 99
            | 请尽快完成支付
          .openPayOrderDetail 订单详情
        .payOrderDetail-wrap
          .msg-wrapper
            .payOrderDetail
              .gzl-flex.payOrderMain
                .img-wrap
                  img(src="http://file.gzl.cn/group1/M00/20/D3/wKkBHlwJ6xCAaMxcAAG8iffjC2I990.jpg")
                .gzl-flex__item.payMsg
                  p 珠海长隆海洋王国珠海长隆海洋王国珠海长隆海洋王国珠海长隆海洋王国珠海长隆海洋王国
                  div.schedule 出发日期:
                    em 2018-12-25
                  div.num 门票数量
                    em 2018-12-25
            +payLi
          .opcityBg
  //- 分期支付
  mixin dividedPay
    .dividedPay
      .gzl-cell
        .gzl-cell__bd.divided-wrap.active
          .dividedTime 12期
          .eachPay 首付2669.74元
          .averageMoney 713.95每期
          .dividedTips 免息
          .dividedSelecIcon
            +icon('#icon-cashier-select1')
        .gzl-cell__bd.divided-wrap
          .dividedTime 6期
          .eachPay 首付2669.74元
          .averageMoney 713.95每期
          .dividedTips 免息
          .dividedSelecIcon
            +icon('#icon-cashier-select1')
        .gzl-cell__bd.divided-wrap
          .dividedTime 3期
          .eachPay 首付2669.74元
          .averageMoney 713.95每期
          .dividedTips 免息
          .dividedSelecIcon
            +icon('#icon-cashier-select1')

block content
  .gzl-page.cashier-page
    section.gzl-section
      +headTips("请勿为陌生人付款,慎防受骗!")
      +readyPayBlock
      .discountCoupon
        a.gzl-cell.gzl-cell_access.cashier-cell.goCouponUsePage
            .gzl-cell__bd 优惠券
            .gzl-cell__ft -￥200
        a.gzl-cell.gzl-cell_access.coupon-fail.goIntegralUsePage
            .gzl-cell__bd 积分
            .gzl-cell__ft.fail  使用失败 请重新选择
      // 分次支付
      .payDivided
        .gzl-cell.pd10
          .gzl-cell__bd 分次支付
          .gzl-cell__ft
            input.gzl-switch(type="checkbox")
        .gzl-cell.payInput
          .gzl-cell__bd
            input.gzl-input(placeholder='请输入本次支付金额' type="number")
      // 支付
      ul.payWayList(id="radioSelect")
        +payWayItem('#icon-cashier-jsyh',"建设银行",true)(blandIndex=0 class="blankItem")
        .selectOtherBlank
          .gzl-cell
            .gzl-cell__bd 其他银行卡
            +icon('#icon-more')
        +payWayItem('#icon-cashier-wx',"微信支付",false,{"cardNum":"信用卡",cardTips:"周末及9号龙支付最高立减￥150"})
        +payWayItem('#icon-cashier-alipay',"支付宝",false,{"cardNum":"信用卡",cardTips:"周末及9号龙支付最高立减￥150"})
        +payWayItem('#icon-cashier-yl',"中国银联",true,{"cardNum":"信用卡信用卡信用卡信用卡"})
        +payWayItem('#icon-cashier-applepay',"Apple Pay",false)(class="hide")
        +payWayItem('#icon-cashier-kuaiqian',"快钱支付",false)(class="hide")
        .otherPayWayTips(class="hide") 其他支付方式
        // 工商银行
          +payWayItem('#icon-cashier-gsyh',"工商银行",true,{"cardNum":"信用卡信用卡信用卡信用卡"})
        +payWayItem('#icon-cashier-jfk',"旅游积分卡",false,{"cardTips":"周末及9号龙支付最高立减￥150"})(class="hide travelIntegralItem")
        +payWayItem('#icon-cashier-shoufuyou',"首付游",false)(class="shoufu hide")
        +dividedPay
        .getOtherPayWay 更多支付方式
    footer.gzl-footer
      .gzl-footbar
        .gzl-flex__item
          a(href="./cashierFinish.html")
            .btn 立即支付
    
append script
  //- 旅游积分使用tempalte
  script(type="text/template", id="simulateTravelIntegralPage")
    .gzl-cells.inputList
      .gzl-cell
        .gzl-label 积分卡卡号
        .gzl-cell__bd
          input.gzl-input(placeholder='请输入卡号')
      .gzl-cell
        .gzl-label 积分卡密码
        .gzl-cell__bd
          input.gzl-input(placeholder='请输入密码')
    .integralUseInput
      p 金额
      .gzl-flex
        span ￥
        .gzl-flex__item
          input(type='number')
        em 全额
    .notEnoughTips
      | 余额不足，卡内可用余额￥
      span 1900
      | ，请重新输入金额
    .commitUse
      .btn 立即支付
  //- 积分使用tempalte
  script(type="text/template", id="integralUsePage")
    .integralUseBox
      .integralContent
        h1 我的积分
        div 5800
        p 本次可用积分
          |
          span 2800
      .integralUse
        .gzl-flex
          .gzl-flex__item
            input(type='number' placeholder='输入使用积分')
          span 全部使用
        .usingTips 400积分抵扣1元，每次使用为400的整数
        .commitUse
          .btn 确定
  //- 优惠券tempalte
  script(type="text/template", id="more-coupon")
      ul.coupon-list
        <% _.each(obj, function(e, i){ %>
        li.coupon-list-item
          .gzl-flex.coupon-item-hd
            .gzl-flex__item 双12全球好购节
            .contact-check
              +icon('#icon-uncheck')
          .coupon-item-bd
            .coupon-discount ￥
              span 5000
              em 满2000可用
            .coupon-date 2016/08/31-2017/01/01
            .show-detail 详情
          ul.coupon-item-dt
            li.gzl-flex
              label 优惠券号：
              .gzl-flex__item HDG87892115HN
            li.gzl-flex
              label 适用范围：
              .gzl-flex__item 适用于易起行散客、邮轮产品，仅适用于部分产品，可用产品请以产品为准。
            li.gzl-flex
              label 有效期限：
              .gzl-flex__item 2018/07/01 00:00-2019/07/01 24:00
            li.gzl-flex
              label 使用范围：
              .gzl-flex__item 订单金额满1000元方可使用；
        <% }) %>
  //- 促销弹窗tempalte
  script(type="text/template", id="promotionPopUp")
    ul.promotionList
      <% _.each(obj,function(e,i){ %>
        li.promotionWay
          .title <%= e.title %>
          ul
            <% _.each(e.promotionSelectItem,function(el,index){ %>
              li.promitionSelectItem
                .gzl-cell
                  .contact-check
                    +icon('#icon-uncheck')
                  .gzl-cell__bd
                    span <%= el.rulesName %>
                    em.showRulesDetail 活动规则
                  .gzl-cell__ft -￥<%= el.moneyReduce %>
                .rulesDetail
                  p <%= el.rulesDescription %>
            <% }) %>
      <% }) %>
  +js("cashierDesk/cashierDesk.js")
  +js("simulatePage/seriesPopUp.js")
  +js("simulatePage/simulatePage.js")
